<template>
  <div class style="overflow: hidden;">
    <el-row>
      <el-col :span="12">
        <div style="font-weight: 700;font-size: 24px;">部门分配方式：</div>
      </el-col>
      <el-col :span="12">
        <el-table :data="datas" style="margin-left:-20%" max-height="400" v-loading="departloading"
          element-loading-text="数据加载中">
          <el-table-column label="三级部门" width="230">
            <template slot-scope="scope">
              <span style="font-size: 20px">{{ scope.row.deptName }}</span>
            </template>
          </el-table-column>
          <el-table-column prop='prioritys' label="优先级" width="120">
            <template slot-scope="scope">
              当前值:<span style="font-weight:bold;font-size:20px;">{{scope.row.priority}}</span>
              <el-input
                size="small"
                v-model="scope.row[scope.column.property]"
                type="number"
                controls-position="right"
                placeholder="请输入"
                :min="0"
                @change="inputChange(scope.$index, scope.row)"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column prop="nums" label="每次分配条数" width="120">
            
            <template slot-scope="scope">

              当前值:<span style="font-weight:bold;font-size:20px;">{{scope.row.num}}</span>
              <el-input
                size="small"
                v-model="scope.row[scope.column.property]"
                type="number"
                controls-position="right"
                placeholder="请输入"
                :min="0"
                @change="input2Change(scope.$index, scope.row,scope)"
              ></el-input>
            </template>
          </el-table-column>
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "personaltable",
  props: {

    datas:Array,
    num:Number,
    departloading:Boolean
  },
  data(){
    return{
      num:'',
      listCustomerAutomaticAssignStrategy:{
        num:''
      }
    }
  },
  methods: {
    // 输入框
    inputChange: function(index, row) {
      this.$emit("inputChange", { index: index, row: row });
    },
    input2Change: function(index, row) {
      this.$emit("input2Change", { index: index, row: row });


      
    },
    change3 (e) {
      
    },
  }
};
</script>

<style lang="scss">
.el-table {
  display: block;
}
.has-gutter tr th {
  text-align: center;
}
.el-table__row td > .cell {
  text-align: center;
}
</style>
<style lang="scss" scoped>
.el-row .el-col {
  margin-left: 0;
}
</style>
